/**
 * 
 */
package com.haizhi.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Service;

import com.haizhi.bean.TbVr;
import com.haizhi.dao.VrDao;
import com.haizhi.service.VrService;

/**
 * @author jiangjintai
 *
 */
@Service("vrService")
public class VrServiceImpl extends BaseServiceImpl<TbVr, Integer> implements VrService {
	@Autowired
	VrDao vrDao;
	/* （非 Javadoc）
	 * @see com.haizhi.service.impl.BaseServiceImpl#getDao()
	 */
	@Override
	protected JpaRepository<TbVr, Integer> getDao() {

		return vrDao;
	}
	/* （非 Javadoc）
	 * @see com.haizhi.service.VrService#findTopByTbProductProductId(java.lang.String)
	 */
	@Override
	public TbVr findTopByTbProductProductIdOrderByVrIdDesc(String productId) {

		return vrDao.findTopByTbProductProductIdOrderByVrIdDesc(Integer.valueOf(productId));
	}
	
}
